#include <stdio.h>
#define MAXLINE 1000    /* maximum input line size */
#define BOUND 80        /* line must be at least this long 
			   to be printed */

int getline(char line[], int maxline);

/* to avoid problems with getline (from the GNU C Library),
   compile using the -std=c99 flag */

/* print input lines that are longer than 80 characters */
int main()
{
    int len;            /* current line length */
    char line[MAXLINE];     /* current input line */
    
    while((len = getline(line, MAXLINE)) > 0)
	if(len >= BOUND)    /* there was a line and it was long enough */
	    printf("%s", line);
    return 0;
}

/* getline:  read a line into s, return length */
int getline(char s[], int lim)
{
    int c, i;

    for(i=0; i<lim-1 && (c=getchar())!=EOF && c!='\n'; ++i)
	s[i] = c;
    if(c == '\n'){
	s[i] = c;
	++i;
    }
    s[i] = '\0';
    return i;
}
